package com.ss.summer.autoconfigure;


import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @author xia17
 * @date 2019/10/17 9:59
 */
@Configuration
@MapperScan("com.ss.summer.mapper")
@ComponentScan(basePackages = "com.ss.summer")
public class SummerAutoConfiguration {

    /**
     * 分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
        //paginationInterceptor.setLimit(你的最大单页限制数量，默认 500 条，小于 0 如 -1 不受限制);
        //return paginationInterceptor;
    }
}
